#ifndef __BSP_I2C_H
#define __BSP_I2C_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "bsp_Inc.h"

#ifdef __cplusplus
}
#endif

#ifdef __cplusplus

class bsp_I2c
{
private:
#define I2C_TIMEOUT 100

    typedef enum
    {
        I2C_OK = 0U,
        I2C_ERROR = 1U,
    } I2C_ret;
    

public:
    BSP_I2C_Handle_t *i2c;
    bsp_I2c(BSP_I2C_Handle_t *hi2c)
    {
        i2c = hi2c;
    }
    ~bsp_I2c()
    {
    }
    I2C_ret write(uint8_t Address, uint8_t *pData, int size);
    I2C_ret write(uint8_t Address, uint8_t pData);
    I2C_ret read(uint8_t Address, uint8_t Reg, uint8_t *pData, int size);
};

#endif

#endif
